<template>
    <!-- 卖车列表 -->

    <div class="app-container">
        <el-dialog width="700px" title="日志" :visible.sync="innerVisible" append-to-body>

            <el-table v-loading="loading" :data="tagList">
                <el-table-column label="拨打人" align="center" prop="callerName" />
                <el-table-column label="电话" align="center">
                    <template slot-scope="{row}">
                        <div>{{ row.phoneNumber }}</div>
                    </template>
                </el-table-column>
                <el-table-column label="拨打次数" align="center" prop="callCount" />

                <el-table-column label="时间" align="center">
                    <template slot-scope="{row}">
                        <div>{{ row.createTime }}</div>
                    </template>
                </el-table-column>
            </el-table>
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
                :limit.sync="queryParams.pageSize" @pagination="getList" />



            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="innerVisible = false">确定</el-button>
                <el-button @click="innerVisible = false">取 消</el-button>
            </div>
        </el-dialog>


    </div>
</template>

<script>
import Enmu from "@/utils/enmu";

import { BuySellCarLog } from "@/api/crm/car";

import { mapGetters } from "vuex"
export default {
    name: "Tag",
    data() {
        return {

            Enmu,
            // 遮罩层
            loading: true,
            // 显示搜索条件
            showSearch: true,
            // 总条数
            total: 0,
            // 标签管理表格数据
            tagList: [],
            // 弹出层标题
            title: "",
            // 是否显示弹出层
            open: false,
            // 查询参数
            queryParams: {
                buySellCarId: "",
                pageNum: 1,
                pageSize: 20
            },
            // 报价列表
            quotationList: [],
            baseInfo: {},
            // 联系列表
            quotationPageInfo: {
                total: 0,
                pageSize: 10,
                pageNum: 1
            },

            innerVisible: false,



        };
    },
    created() {
    },
    filters: {

    },
    computed: {
        ...mapGetters(['allCityList'])
    },
    methods: {
        show(id) {
            this.queryParams.buySellCarId = id
            this.getList()
            this.innerVisible = true
        },
        /** 查询标签管理列表 */
        getList() {
            this.loading = true;
            BuySellCarLog(this.queryParams).then(response => {
                this.tagList = response.rows;
                this.total = response.total;
                this.loading = false;
            });
        },

        // 取消按钮
        cancel() {
            this.open = false;
            this.reset();
        },
        /** 搜索按钮操作 */
        handleQuery() {
            this.queryParams.pageNum = 1;
            this.getList();
        },
        /** 重置按钮操作 */
        resetQuery() {
            this.resetForm("queryForm");
            this.handleQuery();
        }
    }
};
</script>
<style lang="scss" scoped>
.info-content {
    font-size: 14px;

    .base-info {
        display: flex;
        flex-wrap: wrap;
        width: 800px;
    }

    .info-item {
        width: 30%;
        flex: 0 0 30%;
        margin-bottom: 15px;

        span {
            font-weight: 600;
        }
    }

    .info-item-row {
        width: 50%;
        flex: 0 0 50%;
        margin-bottom: 15px;

        span {
            font-weight: 600;
        }
    }
}

.other-info {
    display: flex;
    margin-top: 30px;

    .info-table {
        margin-left: 30px;

        &:first-of-type {
            margin-left: 0;
        }
    }
}

.info-title {
    font-size: 18px;
    margin-bottom: 5px;

    &::before {
        content: "";
        display: inline-block;
        width: 3px;
        height: 15px;
        background: #1777FF;
        border-radius: 3px;
        margin-right: 8px;
    }
}
</style>